Print the current call stackΒΆ
Print the current call stack.
import traceback
def f1():return abc()
def abc():traceback.print_stack()
f1()
Output:
File "7a070e70-25c4-11e7-bc90-3fdc1ec1c64d.py", line 5, in
f1()
File "7a070e70-25c4-11e7-bc90-3fdc1ec1c64d.py", line 3, in f1
def f1():return abc()
File "7a070e70-25c4-11e7-bc90-3fdc1ec1c64d.py", line 4, in abc
def abc():traceback.print_stack()